using System;
using System.Collections.Generic;
using System.Text;

namespace MonoCash.ObjectModel
{
    class ExtendedProperty : ObjectModel
    {
        public class ExtendedPropertyCollection : List<ExtendedProperty>
        {
            private string tableName = "";
            private int tableRow = 0;
            public ExtendedPropertyCollection(string table, int id)
                : base()
            {
                tableName = table;
                tableRow = id;
            }
            public new void Add(ExtendedProperty item)
            {
                item.TableName = tableName;
                item.TableRow = tableRow;
                base.Add(item);
            }
        }

        public ExtendedProperty(object id) : base(id) { }
        public ExtendedProperty() : base() { }

        private string name = "";
        public string Name
        {
            get { return name; }
            set { name = value; SyncToBackend(); }
        }

        private string aValue = "";
        public string Value
        {
            get { return aValue; }
            set { aValue = value; SyncToBackend(); }
        }

        private int tableRow;

        public int TableRow
        {
            get { return tableRow; }
            set { tableRow = value; SyncToBackend(); }
        }

        private string tableName;
        public string TableName
        {
            get { return tableName; }
            set { tableName = value; SyncToBackend(); }
        }
	
	
    }
}
